{% extends 'base.html' %}
{% block title %}物理服务器信息更新{% endblock %}

{% block content %}
<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header">物理服务器信息</h3>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <ul class="nav nav-tabs">
                <li><a href="/assetmanage/asset_table/">查看信息</a>
                </li>
                <li><a href="/assetmanage/asset_add_html/">添加信息</a>
                </li>
                <li class="active"><a href="/assetmanage/asset_update_html/">修改信息</a>
                </li>
                <li><a href="/assetmanage/asset_del_html/">删除信息</a>
                </li>
            </ul>

            <div class="tab-content">
                <div class="tab-pane fade in active">
                    <div class="row">
                    <br>
                        <form action="/assetmanage/asset_update/" method="get" role="form">
                        <ul>
                        <div class="form-group col-lg-3">
                            <label style="color: orange"><label style="color: red">*</label> 资产编号：<input class="form-control" name="asset_num"></label>
                            <label style="color: orange">设备类型：<input class="form-control" name="type"></label>
                            <label style="color: orange">服务器IP：<input class="form-control" name="server_ip"></label>
                            <label style="color: orange">远控卡IP：<input class="form-control" name="remote_ip"></label>
                            <div class="form-group" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                <label style="color: orange">数据中心：
                                    <select class="form-control" name="data_center">
                                        <option></option>
                                        <option>电信兆维</option>
                                        <option>世纪互联</option>
                                        <option>互联通</option>
                                    </select>
                                </label>
                            </div>
                        </div>
                        </ul>
                        <ul>
                        <div class="form-group col-lg-3">
                        	<label style="color: orange">机房编号：<input class="form-control" name="room_num"></label>
                            <label style="color: orange">机柜编号：<input class="form-control" name="rack_num"></label>
                            <div class="form-group" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                <label style="color: orange">系统类型：
                                    <select class="form-control" name="system_type">
                                        <option></option>
                                        <option>ESXI 5.1</option>
                                        <option>CentOS 6.5</option>
                                        <option>CentOS 7.2</option>
                                        <option>SUSE SP3</option>
                                        <option>SUSE SP4</option>
                                        <option>Ubuntu</option>
                                        <option>Windows 2008</option>
                                        <option>Windows 2003</option>
                                    </select>
                                </label>
                            </div>
                            <label style="color: orange">CPU型号、核数及个数：<input class="form-control" name="cputype_num"></label>
                            <label style="color: orange">磁盘大小、数目：<input class="form-control" name="disksize_num"></label>
                        </div>
                        </ul>
                        <ul>
                        <div class="form-group col-lg-3">
                        	<label style="color: orange">内存大小、数目：<input class="form-control" name="memsize_num"></label>
                            <div class="form-group" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                <label style="color: orange">磁盘阵列：
                                    <select class="form-control" name="disk_raid">
                                        <option></option>
                                        <option>RAID 5</option>
                                        <option>RAID 0</option>
                                        <option>RAID 1</option>
                                        <option>RAID 10</option>
                                    </select>
                                </label>
                            </div>
                            <div class="form-group" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                <label style="color: orange">网卡类型、数目：
                                    <select class="form-control" name="card_type_num">
                                        <option></option>
                                        <option>千兆x4</option>
                                        <option>千兆x2</option>
                                        <option>万兆x2</option>
                                        <option>万兆x4</option>
                                    </select>
                                </label>
                            </div>
                            <div class="form-group" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                <label style="color: orange">电源数目：
                                    <select class="form-control" name="power_num">
                                        <option></option>
                                        <option>2</option>
                                        <option>1</option>
                                    </select>
                                </label>
                            </div>
                            <label style="color: orange">服务编号：<input class="form-control" name="service_num"></label>
                        </div>
                        </ul>
                        <ul>
                        <div class="form-group col-lg-3">
                            <label style="color: orange">购买时间：<input class="form-control" name="buy_time"></label>
                            <label style="color: orange">过期时间：<input class="form-control" name="expiration_time"></label>
                            <label style="color: orange">备注：<input class="form-control" name="note"></label>
                            <br><input class="btn btn-warning btn-sm" type="submit" value="更新">
                        </div>
                        </ul>
                        </form>
                    </div>
                    <br>
                    <label style="color: red;font-size: 14px;" class="fa fa-refresh"> 更新成功，附表如下：</label>
                    <div class="row"> 
                        <div class="col-lg-12">
                            <div class="table-responsive">
                            <pre style="line-height: 0px">
                                <table class="table table-bordered table-hover table-striped" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                    <thead>
                                        <tr>
                                            <th>资产编号</th>
                                            <th>设备类型</th>
                                            <th>服务器IP</th>
                                            <th>远控卡IP</th>
                                            <th>数据中心</th>
                                            <th>机房编号</th>
                                            <th>机柜编号</th>
                                            <th>系统类型</th>
                                            <th>CPU型号、数目</th>
                                            <th>磁盘大小、数目</th>
                                            <th>内存大小、数目</th>
                                            <th>磁盘阵列</th>
                                            <th>网卡类型、数目</th>
                                            <th>电源数目</th>
                                            <th>服务编号</th>
                                            <th>购买时间</th>
                                            <th>过期时间</th>
                                            <th>备注</th>
                                            <th>管理</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>{{ asset_update.asset_num }}</td>
                                            <td>{{ asset_update.type }}</td>
                                            <td>{{ asset_update.server_ip }}</td>
                                            <td>{{ asset_update.remote_ip }}</td>
                                            <td>{{ asset_update.data_center }}</td>
                                            <td>{{ asset_update.room_num }}</td>
                                            <td>{{ asset_update.rack_num }}</td>
                                            <td>{{ asset_update.system_type }}</td>
                                            <td>{{ asset_update.cputype_num }}</td>
                                            <td>{{ asset_update.disksize_num }}</td>
                                            <td>{{ asset_update.memsize_num }}</td>
                                            <td>{{ asset_update.disk_raid }}</td>
                                            <td>{{ asset_update.card_type_num }}</td>
                                            <td>{{ asset_update.power_num }}</td>
                                            <td>{{ asset_update.service_num }}</td>
                                            <td>{{ asset_update.buy_time }}</td>
                                            <td>{{ asset_update.expiration_time }}</td>
                                            <td>{{ asset_update.note }}</td>
                                            <td><a href="/assetmanage/asset_update_arg_keep/?asset_num={{ asset_update.asset_num }}"><button class="btn btn-warning btn-xs" type="button">更改</button></a> <a href="/assetmanage/asset_del/?asset_num={{ asset_update.asset_num }}"><button class="btn btn-danger btn-xs" type="button">删除</button></a></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>   
</div>
{% endblock %}